import java.awt.event.KeyEvent;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

public class test {
    public static void main(String[] args) {
        Field[] fields = KeyEvent.class.getDeclaredFields();

        for (Field field : fields) {
            int modifiers = field.getModifiers();
            if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && Modifier.isFinal(modifiers)) {
                try {
                    String name = field.getName();
                    int keyCode = field.getInt(null);
                    System.out.println(name + ": " + keyCode);
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                }
            }
        }
        // ASCII 码值
        int asciiValue = 1; // 65 对应大写字母 'A'
        int asciiValue2 = 8; // 65 对应大写字母 'A'

        // 将 ASCII 码值转换为字符
        char character = (char) asciiValue;
        char character2 = (char) asciiValue2;

        // 输出字符
        System.out.println("ASCII " + asciiValue + " 对应的字符是: " + character);
        System.out.println("ASCII " + asciiValue2 + " 对应的字符是: " + character2);

    }
}

